Skip to content

HTTPCLIENT-1748: fix for trunk - #55

Closed
sebastiencaille wants to merge 5 commits into
apache:trunkfrom
sebastiencaille:trunk
Closed

HTTPCLIENT-1748: fix for trunk#55
sebastiencaille wants to merge 5 commits into
apache:trunkfrom
sebastiencaille:trunk

Conversation

@sebastiencaille

Copy link
Copy Markdown

Hello,
as discussed before, here is a patch proposal for the trunk.
(I added a basic test case)

Cheers
Sébastien


final URL targetHostURL;
if (context != null) {
final HttpUriRequest httpUriRequest = (HttpUriRequest) context.getAttribute(HttpCoreContext.HTTP_REQUEST);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One cannot assume the request object in the context to be always of type of HttpUriRequest. It would be safer to use the generic HttpRequest type here.

Otherwise everything looks good to me.

@sebastiencaille

sebastiencaille commented Jul 31, 2016

Copy link
Copy Markdown
Author

is it ok to use
final HttpRequest httpRequest = (HttpRequest)context.getAttribute(HttpCoreContext.HTTP_REQUEST);
httpRequest.getRequestLine().getUri()

instead ?

@ok2c

ok2c commented Aug 13, 2016

Copy link
Copy Markdown
Member

Committed to SVN trunk. Please review and close the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants